#include "cpu/exec/template-start.h"

#define instr ret

static void do_execute() {
    cpu.eip = swaddr_read(reg_l(R_ESP), 4);
    reg_l(R_ESP) += 4;

    cpu.eip -= 1;
    
    print_asm("ret");
}

make_helper(ret) {
    do_execute();
    return 1;
}

#include "cpu/exec/template-end.h"